<?php
if (!function_exists('getGuestbookName')) 
{
	function getGuestbookName()
	{
		$CI = &get_instance();
		$name = $CI->input->post('name');
		if($name != null)
		{
			return $name;
		}
		return null;
	}
}

if (!function_exists('getGuestbookMessage')) 
{
	function getGuestbookMessage()
	{
		$CI = &get_instance();
		$message = $CI->input->post('message');
		if($message != null)
		{
			return $message;
		}
		return null;
	}
}

// Functions to define urls and titles for the masterpage
if (!function_exists('getGuestbookViewUrl'))
{
	function getGuestbookViewUrl()
	{
		return "guestbook/guestbook";
	}
}

if (!function_exists('getGuestbookViewTitle'))
{
	function getGuestbookViewTitle()
	{
		return "Guestbook";
	}
}

if (!function_exists('getGuestbookViewSuccessUrl'))
{
	function getGuestbookViewSuccessUrl()
	{
		return "guestbook/success";
	}
}

if (!function_exists('getGuestbookViewSuccessTitle'))
{
	function getGuestbookViewSuccessTitle()
	{
		return "Successfully posted";
	}
}

if (!function_exists('getGuestbookCtrlBase'))
{
	function getGuestbookCtrlBase()
	{
		return "guestbook/guestbook";
	}
}

